<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('分类')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-category_id" class="form-control selectpage" name="row[category_id]" data-source="tools/category/index" data-multiple="false" type="text"  value="{$row.category_id}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('来源')}:</label>
        <div class="col-xs-12 col-sm-8">
            <!--@formatter:off-->
            <select id="c-source" class="form-control selectpicker" name="row[source]">
                {foreach name="sourceList" item="vo"}
                <option value="{$key}" {in name="key" value="$row.source" }selected{/in}>{$vo}</option>
                {/foreach}
            </select>
            <!--@formatter:on-->
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('标签')}:</label>
        <div class="col-xs-12 col-sm-8">
            <!--@formatter:off-->
            <select id="c-flag" class="form-control selectpicker" multiple="" name="row[flag][]">
                {foreach name="flagList" item="vo"}
                <option value="{$key}" {in name="key" value="$row.flag" }selected{/in}>{$vo}</option>
                {/foreach}
            </select>
            <!--@formatter:on-->
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('标识')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-code" data-rule="required" class="form-control" name="row[code]" type="text" value="{$row.code|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-images" data-rule="required" class="form-control" size="50" name="row[images]" type="text" value="{$row.images|htmlentities}">
                <input id="h-c-images" class="form-control hidden" type="text" value="{$row.fullurl|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-images"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Desc')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-desc" data-rule="required" class="editor form-control" name="row[desc]" type="text">{$row.desc|htmlentities}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('姓氏字体')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-font_ids" class="form-control selectpage" name="row[font_ids]" data-source="tools/font/index" data-multiple="true" type="text"  value="{$row.font_ids}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('宣言字体')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-font1_ids" class="form-control selectpage" name="row[font1_ids]" data-source="tools/font/index" data-multiple="true" type="text"  value="{$row.font1_ids}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('默认字体颜色')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-default_color" class="form-control" name="row[default_color]" type="color" value="{$row.default_color}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('默认字体颜色')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-default_color1" class="form-control" name="row[default_color1]" type="color" value="{$row.default_color1}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('默认姓氏/文案')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-default_surname" class="form-control" name="row[default_surname]" type="text" value="{$row.default_surname|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('默认姓氏字体')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-default_font" class="form-control selectpage" name="row[default_font]" data-source="tools/font/index" type="text"  value="{$row.default_font}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('默认宣言')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-default_declaration" class="form-control" name="row[default_declaration]" type="text" value="{$row.default_declaration|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('默认宣言字体')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-default_font1" class="form-control selectpage" name="row[default_font1]" data-source="tools/font/index" type="text"  value="{$row.default_font1}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('默认生肖')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select id="c-type" data-rule="required" class="form-control selectpicker" name="row[default_zodiac]">
                {foreach name="zodiacList" item="vo"}
                <option value="{$key}" {in name="key" value="$row.default_zodiac"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('默认模板/背景')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-default_template" class="form-control selectpage" name="row[default_template]" data-order-by="id" data-params='{"custom[tool_id]":"<?php echo $row["id"];?>"}' data-source="tools/template/index" type="text"  value="{$row.default_template}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('View_num')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-view_num" class="form-control" name="row[view_num]" type="number" value="{$row.view_num|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Use_num')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-use_num" class="form-control" name="row[use_num]" type="number" value="{$row.use_num|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('File')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-file" class="form-control" name="row[file]" type="number" value="{$row.file|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Page')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-page" data-rule="required" class="form-control" name="row[page]" type="number" value="{$row.page|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weight" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
